<template>
	<view id="news-data">
		<header-back :headerTitle="$lang('headlineDetails')"></header-back>
		<view class="news-details">
			<view class="news-details-title">{{details.title}}</view>
			<view class="news-details-other">
				<text class="time">{{details.create_time}}</text>
			</view>
			<rich-text :nodes="details.content"></rich-text>
		</view>
	</view>
</template>

<script>
	import headerBack from '@/components/headerBack.vue'
export default {
	data() {
		return {
			details: {},
			cid: '',
		};
	},
	onLoad(e) {
		this.cid = e.cid;
		this.getDetail();
	},
	components: {
		headerBack
	},
	onShow() {

	},
	methods: {
		getDetail(){
			this.$api.sendRequest({
				url: '/api/article/info',
				data: {id: this.cid},
				method: 'get',
				success: res=>{
					if(res.code == 0){
						this.details = res.data;
					}else {
						this.$util.showToast({title: res.messages})
					}
				}
			})
		},
	}
};
</script>

<style>
	page {
		background: #fff;
	}
</style>

<style scoped lang="scss">
	#news-data {
		padding: 27upx;
		box-sizing: border-box;
		.news-details{
			.news-details-title{
				font-size: 36upx;
				font-weight: bold;
				color: #000000;
				line-height: 45upx;
			}
			.news-details-other{
				
				font-size: 24upx;
				font-weight: 400;
				color: #909090;
				line-height: 34upx;
				margin-top: 18upx;
				.tiwce,.news-store{
					margin-right: 20upx;
				}
			}
		}
	}
	
	video{
		width: 696upx;
		height: 389upx;
		margin-top: 20upx;
		border-radius: 8upx;
	}
</style>
